{% extends 'base.html' %}
{% block title %}QEB老师管理———签到页{% endblock %}
{% block Navigation %}
<div class="carousel slide" id="carousel-176804" style="margin:55px 0;">

<ul class="nav nav-tabs">
    <li style="background-color: rgb(240, 173, 78);"><a href="/teacher" style="font-size: larger;color: rgb(243, 8, 8);">教师管理/</a></li>
    {% for teacher in teachers %}
    <li ><a href="/teacher/{{ teacher.id }}">{{ teacher.name }}</a></li>
    <!-- <img alt="" src="/media/{{ teacher.imgae }}" class="img-thumbnail"/> -->
    {% endfor %}
</ul>
<h1><span class="label label-info">{{ teacher.name }}老师本月耗课时 <span style="color: crimson;">{{ teacher_unmber_of_classes }}</span> 节</span></h1>
{% if timetable_list %}    
  {% for timetable_list_m in timetable_list %}

    <div class="jumbotron" style="height: 500px;width: 200px;float: left;background-color: rgba(187, 144, 65, 0.445);margin: 100px 40px;">
      <div style="margin:  auto;">

        {% if timetable_list_m == timetable_list.0 %}
          {% if timetable_image_list.0.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.0.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}
        {% elif timetable_list_m == timetable_list.1 %}
          {% if timetable_image_list.1.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.1.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}
        {% elif timetable_list_m == timetable_list.2 %}
          {% if timetable_image_list.2.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.2.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}        
        {% elif timetable_list_m == timetable_list.3 %}
          {% if timetable_image_list.3.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.3.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}
        {% elif timetable_list_m == timetable_list.4 %}
          {% if timetable_image_list.4.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.4.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}       
        {% elif timetable_list_m == timetable_list.5 %}
          {% if timetable_image_list.5.0.0 %}
            <img alt="" src="/media/{{ timetable_image_list.5.0.0.imgae }}" class="img-thumbnail"/>
          {% else %}
            <img alt="" src="\static\img\MJ.jpg" class="img-thumbnail"/>
          {% endif %}
        {% endif %}

      </div>
      {% for timetable_list_name in timetable_list_m %}
        <form role="searchs" method="POST" id="searchform" style="margin: 10px 25%;">
          {% csrf_token %}
          <button type="submit" name="{{ timetable_list_name }}" class="btn btn-warning" data-loading-text="Loading...">
            {{ timetable_list_name }}
          </button>
        </form>
      {% endfor %}
    </div> 

  {% endfor %}  

{% else %}  
<div class="carousel slide" id="carousel-176804" style="background-color: brown;width: 600px;margin: 100px 300px;">
  <ol class="carousel-indicators">
      <li class="active" data-slide-to="0" data-target="#carousel-176804">
      </li>
      <li data-slide-to="1" data-target="#carousel-176804">
      </li>
      <li data-slide-to="2" data-target="#carousel-176804">
      </li>
  </ol>
  <div class="carousel-inner">
      <div class="item active">
          <img alt="" src="\static\img\1.JPG " />
          <div class="carousel-caption">
              <h2>
                  大家好！我是王老师
              </h2>
              <p>
                  今天休息一下吧.
              </p>
          </div>
      </div>
      <div class="item">
          <img alt="" src="\static\img\2.JPG" />
          <div class="carousel-caption">
              <h2>
                大家好！我是胡老师
              </h2>
              <p>
                今天休息一下吧.
              </p>
          </div>
      </div>
      <div class="item">
          <img alt="" src="\static\img\3.JPG" />
          <div class="carousel-caption">
              <h2>
                大家好！我是谢老师
              </h2>
              <p>
                今天休息一下吧.
              </p>
          </div>
      </div>
  </div> <a class="left carousel-control" href="#carousel-176804" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a> <a class="right carousel-control" href="#carousel-176804" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>
{% endif %}

</div>


{% endblock Navigation %}